package com.example.mongo.dao;

import com.example.mongo.Model.bean.User;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;


public interface UserMapper extends MongoRepository<User, String> {

    @Query("{id:?0}")
    public User getUserById(String id);

    @Query(value = "{userName:?0}")
    public User getUserByUserName(String userName);

    @Query(value = "{isVIP:?0}")
    public List<User> getUsersByIsVIP(int isVIP);


   // public User updatePassword(String id);

}
